public class CreditLimitBalanceModel extends Object implements XMLMarshallable
Java class represents a credit limit balance defined in a subscriber account
stored in customer master data owned by a service provider;
A credit limit balance is a monetary counter associated to a currency and intended to limit the use of a marketable service for a time period.
A credit limie balance add one or more amount alerts to this credit limit balance.
SubscriberAccountModel,
AmountAlertModelThe XML APIs specify the following XSD fragment:
XSD Fragment
<xs:element name="creditLimitBalance">
<xs:complexType>
<xs:sequence>
<xs:element ref="amountAlert" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="code" type="xs:string" use="required"/>
<xs:attribute name="description" type="xs:string"/>
<xs:attribute name="currency" type="xs:string" use="required"/>
<xs:attribute name="amount" type="xs:string" use="required"/>
<xs:attribute name="creditLimit" type="xs:string"/>
<xs:attribute name="isDefault" type="xs:boolean"/>
<xs:attribute name="referenceDate" type="xs:dateTime"/>
<xs:attribute name="resetRecurringDates" type="xs:string"/>
</xs:complexType>
</xs:element>
| Constructor and Description |
|---|
CreditLimitBalanceModel()
Builds an empty credit limit balance.
|
CreditLimitBalanceModel(String code,
String description,
BigDecimal amount,
String currency,
BigDecimal creditLimit)
Builds an credit limit balance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAmountAlert(AmountAlertModel alert)
Adds a
AmountAlertModel to this credit limit balance amount alerts list. |
void |
addCharacterData(String cData)
Adds character data to the content element.
|
void |
addChild(String tagName,
XMLMarshallable child)
Adds a child to the object, the
child representing
the marshallable object which must be added to the element. |
BigDecimal |
getAmount()
Gets the amount of the credit limit balance.
|
int |
getAmountAlertCount()
Gets the size of this credit limit balance amount alerts list.
|
Iterator<AmountAlertModel> |
getAmountAlertIterator()
Gets this credit limit balance amount alerts list iterator.
|
AmountAlertModel[] |
getAmountAlerts()
Gets this credit limit balance amount alerts list.
|
String |
getCode()
Gets the code of the credit limit balance.
|
RatingContextDescription |
getContext(ContextualNode child) |
BigDecimal |
getCreditLimit()
Gets the credit limit amount of the credit limit balance.
|
String |
getCurrencyCode()
Gets the currency code of the credit limit balance.
|
String |
getDescription()
Gets the description of the credit limit balance.
|
Date |
getReferenceDate()
Gets the reference date of the credit limit balance.
|
RecurringDateModel |
getResetRecurringDate()
Gets the reset recurring date of the credit limit balance.
|
RatingContextDescription |
inheritedContext() |
boolean |
isDefault()
Tests if this credit limit balance is the default one.
|
void |
isDefault(boolean isDefault)
Sets this credit limit balance to be the default one.
|
void |
marshal(XMLOutputter output)
Gives an XML representation of this object, including its children.
|
boolean |
removeAmountAlert(AmountAlertModel alert)
Removes a
AmountAlertModel to this credit limit balance amount alerts list. |
AmountAlertModel |
removeAmountAlert(int index)
Removes a
AmountAlertModel at given index to this credit limit balance amount alerts list. |
void |
setAmount(BigDecimal amount)
Sets the amount of the credit limit balance.
|
void |
setAmountAlerts(AmountAlertModel[] alerts)
Sets this credit limit balance amount alerts list.
|
void |
setAttributes(XMLAttributes atts)
Sets the attributes of the XML representation of the element being
processed.
|
void |
setCode(String code)
Sets the code of the credit limit balance.
|
void |
setCreditLimit(BigDecimal creditLimit)
Sets the credit limit amount of the credit limit balance.
|
void |
setCurrencyCode(String currencyCode)
Sets the currency code of the credit limit balance.
|
void |
setDescription(String description)
Sets the description of the credit limit balance.
|
void |
setReferenceDate(Date referenceDate)
Sets the reference date of the credit limit balance.
|
void |
setResetRecurringDate(RecurringDateModel resetRecurringDate)
Sets the reset recurring date of the credit limit balance.
|
public CreditLimitBalanceModel()
public CreditLimitBalanceModel(String code, String description, BigDecimal amount, String currency, BigDecimal creditLimit)
code - The identification code of the credit limit balancedescription - The description of the credit limit balanceamount - The amount of the credit limit balancecurrency - The currency of the credit limit balancecreditLimit - The credit limit amount of the credit limit balancepublic BigDecimal getAmount()
public void setAmount(BigDecimal amount)
amount - The amount of the credit limit balancepublic String getCode()
public void setCode(String code)
code - The code of the credit limit balancepublic String getDescription()
public void setDescription(String description)
description - The description of the credit limit balancepublic BigDecimal getCreditLimit()
public void setCreditLimit(BigDecimal creditLimit)
creditLimit - The credit limit amount of the credit limit balancepublic String getCurrencyCode()
public void setCurrencyCode(String currencyCode)
currencyCode - The currency code of the credit limit balancepublic RecurringDateModel getResetRecurringDate()
public void setResetRecurringDate(RecurringDateModel resetRecurringDate)
resetRecurringDate - The RecurringDateModel of the credit limit balancepublic Date getReferenceDate()
public void setReferenceDate(Date referenceDate)
referenceDate - The reference date of the credit limit balancepublic boolean isDefault()
true if this credit limit balance is the default one, false otherwisepublic final void isDefault(boolean isDefault)
isDefault - The boolean value to define if this credit limit balance
is the default onepublic void addAmountAlert(AmountAlertModel alert)
AmountAlertModel to this credit limit balance amount alerts list.alert - The AmountAlertModel to be addedpublic boolean removeAmountAlert(AmountAlertModel alert)
AmountAlertModel to this credit limit balance amount alerts list.alert - The AmountAlertModel to be removedtrue if the alert is successfully removed, false otherwisepublic AmountAlertModel removeAmountAlert(int index)
AmountAlertModel at given index to this credit limit balance amount alerts list.index - The index of the AmountAlertModel to be removedAmountAlertModelpublic int getAmountAlertCount()
public AmountAlertModel[] getAmountAlerts()
public Iterator<AmountAlertModel> getAmountAlertIterator()
public void setAmountAlerts(AmountAlertModel[] alerts)
alerts - The list of AmountAlertModel of this credit
limit balance amount alerts listpublic RatingContextDescription getContext(ContextualNode child)
public RatingContextDescription inheritedContext()
public void setAttributes(XMLAttributes atts)
XMLMarshallablesetAttributes in interface XMLMarshallableatts - The XML attributes of the current elementpublic void addChild(String tagName, XMLMarshallable child)
XMLMarshallablechild representing
the marshallable object which must be added to the element.addChild in interface XMLMarshallabletagName - The name of tag for the childchild - The child to be addedpublic void addCharacterData(String cData)
XMLMarshallableaddCharacterData in interface XMLMarshallablecData - The character data to be addedpublic void marshal(XMLOutputter output)
XMLMarshallablemarshal in interface XMLMarshallableoutput - The XML output to marshal the object into